package ihm.manes_ho.agenda;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

/**
 * Agenda - This is the main activity
 * <p> This consists of 3 activities:
 * <p> 1. Liste de courses
 * <p> 2. Calendar
 * <p> 3. Menu
 */
public class Agenda extends TabActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		final TabHost tabHost = getTabHost();

		tabHost.addTab(tabHost.newTabSpec("tab_liste_de_courses")
				.setIndicator(getResources().getString(R.string.tab_liste_des_courses), 
						getResources().getDrawable(R.drawable.icon_liste_de_courses))
						.setContent(new Intent(this, ListeDeCourses.class)));

		tabHost.addTab(tabHost.newTabSpec("tab_calendrier")
				.setIndicator(getResources().getString(R.string.tab_calendrier),
						getResources().getDrawable(R.drawable.icon_calendar))
						.setContent(new Intent(this, Calendar.class)));

		tabHost.addTab(tabHost.newTabSpec("tab_menu")
				.setIndicator(getResources().getString(R.string.tab_menu), 
						getResources().getDrawable(R.drawable.icon_menu))
						.setContent(new Intent(this, Menu.class)));
		//						.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
	}
}